找传奇、传世资源到传世资源站!

python 多张图片黑底白字转白底黑字

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

需要 pip install sheenfrom clipboard 原图:from clipboard 转换后:from clipboard

 nn = 1str_name1 = 'cut'str_name3 = '.png'rootdir = r'C:\Users\Administrator\Downloads\Downloads'for parent, dirnames, filenames in os.walk(rootdir): for filename in filenames: print('parent is :' parent) print('filename is :' filename) currentPath = os.path.join(parent, filename) print('THe full filename is:' currentPath) image=cv2.imread(currentPath) image2=cv2.bitwise_not(image) dizhi = r'C:\Users\Administrator\Downloads\a' dizhi = dizhi str_name1 str(nn) str_name3 cv2.imwrite(dizhi, image2) nn = 1

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复